#include "PAP_defs.h"
#include "derivative.h"

#define ADC_8BIT    1
#define ADC_10BIT   0

#define ADC_LEFT_JUSTIFY    0
#define ADC_RIGHT_JUSTIFY   1

#define ADC_UNSIGNED    0
#define ADC_SIGNED      1

#define ADC_CONTINOUS_CONVERSION    1
#define ADC_SINGLE_CONVERSION       0

#define ADC_PRESCALER_FACTOR_2      0
#define ADC_PRESCALER_FACTOR_4      1
#define ADC_PRESCALER_FACTOR_6      2  
#define ADC_PRESCALER_FACTOR_8      3
#define ADC_PRESCALER_FACTOR_10     4
#define ADC_PRESCALER_FACTOR_12     5
#define ADC_PRESCALER_FACTOR_14     6
#define ADC_PRESCALER_FACTOR_16     7
#define ADC_PRESCALER_FACTOR_18     8
#define ADC_PRESCALER_FACTOR_20     9
#define ADC_PRESCALER_FACTOR_22     10
#define ADC_PRESCALER_FACTOR_24     11
#define ADC_PRESCALER_FACTOR_26     12
#define ADC_PRESCALER_FACTOR_28     13
#define ADC_PRESCALER_FACTOR_30     14
#define ADC_PRESCALER_FACTOR_32     15

void vfnADC_ChannelSelect (uint8 u8channel);

void vfnADC_ConversionMode (uint8 u8mode);

void vfnADC_PinEnable (uint8 u8pin);

void vfnADC_PowerUp (void);

void vfnADC_Disable (void);

void vfnADC_Resolution (uint8 u8resolution);

void vfnADC_Signed (uint8 u8sign);

void vfnADC_Justification (uint8 u8justification);

void vfnADC_PrescalerSelect (uint8 u8prescaler);

uint8 u8ADC_GetResult (void);

uint8 u8ADC_CheckCCF (void);